<style scoped>
  .weui-form-preview__hd label, .weui-form-preview__hd em {
    font-size: .9em !important;
  }
  .weui-loadmore_line .weui-loadmore__tips {
    background-color: #eee;
  }
  .rj-cell.max span{
    font-size: 16px;
    padding-right: 20px;
  }
  .rj-cell label {
    color: #333;
    font-size: 14px;
    width: 44%;
    display: inline-block;
    padding: 5px 3%;
    text-align: right;
  }
  .rj-cell span {
    font-size: 14px;
    color: #333;
    display: inline-block;
    width: 50%;
  }
  .rj-cell.note label{
    float: left;
  }
  .rj-cell.note span{
    width: 80%;
    display: inline-block;
  }
  .weui-cell {
    background: #fff;
  }
  #acts span {
    font-size: 14px;
  }
  .halfbtn {
    display: inline-block;
    width: 49%;
  }
  .weui-label{
    /*width: 130px;*/
    text-align: left;
  }

  .weui-select {
    height: auto;
    line-height: normal;
  }
  *{
    list-style:none;
  }
  /*body{*/

  /*}*/
  .weui-cell_select {
    padding: 10px 15px;
  }
  .weui-cells__title {
    text-align: left;
  }
  .hide {
    display: none;
  }
  #acts {
    font-size: 0;
  }
  #acts span {
    font-size: 14px;
  }
  input.time {
    border: none;
    font-size: 16px;
    padding-left: 10px;
  }
  .inlinput1 {
    width: 50%;
  }
  .inlinput2 {
    /*width: 50%;*/
  }
</style>
<template>
  <div  class="oitem">
    <div class="weui-cells__title">货品明细{{parseInt(itemindex) + 1}}
    </div>
    <div class="weui-cell fir">
      <div class="weui-cell__hd"><label class="weui-label">货品</label></div>
      <div class="weui-cell__bd">
        <input class="weui-input" type="text" readonly :value="itemdata.productname + '[' + itemdata.spname + ']'">
      </div>
    </div>
    <template v-if="settletype == 1">
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">订单数量</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input inlinput1" type="text" readonly :value="itemdata.weight">
          <input class="weui-input inlinput2" type="text" readonly :value="itemdata.unit">
        </div>
        <div class="weui-cell__hd"><label class="weui-label">赠送数量</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input inlinput1" type="text" readonly :value="itemdata.handselcount">
          <input class="weui-input inlinput2" type="text" readonly :value="itemdata.unit">
        </div>
      </div>
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">出库数量</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input handselweight inlinput1" readonly type="number" :value="itemdata.unloadweight">
          <input class="weui-input inlinput2" type="text" readonly :value="itemdata.unit">
        </div>
        <div class="weui-cell__hd"><label class="weui-label">单价</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input inlinput1" type="text" readonly :value="itemdata.price">
          <input class="weui-input inlinput2" type="text" readonly :value="payUnit(itemdata.unit)">
        </div>
      </div>
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">结算金额</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input inlinput1" type="text" readonly :value="itemdata.settleamount">
          <input class="weui-input inlinput2" type="text" readonly value="元">
        </div>
      </div>
    </template>
    <template v-if="settletype == 2">
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">订单数量</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input weight inlinput1" readonly type="number" :value="itemdata.weight">
          <input class="weui-input inlinput2" type="text" readonly :value="itemdata.unit">
        </div>
      </div>
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">出库数量</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input handselweight inlinput1" readonly type="number" :value="itemdata.unloadweight">
          <input class="weui-input inlinput2" type="text" readonly :value="itemdata.unit">
        </div>
      </div>
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">单价</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input inlinput1" type="text" readonly :value="itemdata.price">
          <input class="weui-input inlinput2" type="text" readonly :value="payUnit(itemdata.unit)">
        </div>
        <div class="weui-cell__hd"><label class="weui-label">结算金额</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input inlinput1" type="text" readonly :value="itemdata.settleamount">
          <input class="weui-input inlinput2" type="text" readonly value="元">
        </div>
      </div>
    </template>
  </div>
</template>

<script>
export default {
  name: 'SellFinalSureItem',
  data () {
    return {
      weight: '',
      discount: '',
      deducttype: '',
      deliverytype: 2
    }
  },
  props: [
    'itemindex',
    'itemdata',
    'settletype',
    'concessiontype',
    // 'deliverytype',
    'quitSRType',
    'packindex'
  ],
  computed: {
  },
  mounted() {
  },
  watch: {
  },
  methods: {
    payUnit: function (unit) {
      return '元/' + unit;
    }
  }
}
</script>
